package com.cqdev.washer.biz.model;

import lombok.Data;

import java.util.Date;

/**
 * @author yunfei.li
 *         类描述: TODO
 *         日期： 2018/6/22
 */
@Data
public class SqlScriptBO {

    private Long id;

    private String script;

    private String name;

    private String description;

    private Integer sn;

    private Date lastExecuteTime;

    private String lastExecuteStatus;

    private Integer executeCount;

    private Long lastElapsedTime;

    public SqlScriptBO(String script, String name, String description, Integer sn) {
        this.script = script;
        this.name = name;
        this.description = description;
        this.sn = sn;
    }

    public SqlScriptBO(Long id, String script, String name, String description, Integer sn) {
        this.id = id;
        this.script = script;
        this.name = name;
        this.description = description;
        this.sn = sn;
    }

    public SqlScriptBO(Long id, String script, String name, String description, Integer sn, Date lastExecuteTime, String lastExecuteStatus, Integer executeCount, Long lastElapsedTime) {
        this.id = id;
        this.script = script;
        this.name = name;
        this.description = description;
        this.sn = sn;
        this.lastExecuteTime = lastExecuteTime;
        this.lastExecuteStatus = lastExecuteStatus;
        this.executeCount = executeCount;
        this.lastElapsedTime = lastElapsedTime == null ? 0L : lastElapsedTime;
    }
}
